package cn.xyh.dao;


import cn.xyh.model.Permission;

import java.util.List;
import java.util.Set;


public interface PermissionWriteMapper {


    /**
     * 新增
     */
    public Integer insertPermission(Permission entity) throws Exception;


    /**
     * 删除多个
     */
    public Integer delPermissionByIds(String[] ids) throws Exception;

    /**
     * 删除
     */
    public Integer delPermission(long id) throws Exception;


    /**
     * 修改
     */
    public int updatePermission(Permission entity) throws Exception;

    /**
     * 根据ID查找对象
     */
    public Permission getPermissionById(long permissionId) throws Exception;


    /**
     * 根据Code查找对象
     */
    public Permission getPermissionByCode(String code) throws Exception;


    /**
     * 根据名称查找对象
     */
    public Permission getPermissionByName(String name) throws Exception;


    /**
     * 根据多种条件查找列表总数
     */
    public Integer getPermissionCount(Permission entity) throws Exception;


    /**
     * 根据多种条件查找列表
     */
    public List<Permission> getPermissionList(Permission entity) throws Exception;

    public Set<String> getPermsByySetName(List<Integer> roleset);
}

